package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.service.UserService;
import net.wanho.vo.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author：汤小洋
 * Date：2024-08-16 9:32
 * Description：<描述>
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;

    @GetMapping("/{id}")
    public AjaxResult findById(@PathVariable Integer id){
        return AjaxResult.success(userService.findById(id));
    }

}
